import React from 'react';
import { Table } from 'antd';
import type { ColumnsType } from 'antd/es/table';

interface DataType {
  key: string;
  nationalLevel: number;
  provincialLevel: number;
  universityLevel: number;
  instituteLevel: number;
  totalScore: number;
}

const columns: ColumnsType<DataType> = [
  {
    title: '国家级',
    dataIndex: 'nationalLevel',
    key: 'nationalLevel',
  },
  {
    title: '省部级',
    dataIndex: 'provincialLevel',
    key: 'provincialLevel',
  },
  {
    title: '校级',
    dataIndex: 'universityLevel',
    key: 'universityLevel',
  },
  {
    title: '院级',
    key: 'instituteLevel',
    dataIndex: 'instituteLevel',
  },
  {
    title: '总成绩',
    key: 'totalScore',
    dataIndex: 'totalScore',
  },
];

const data: DataType[] = [
  {
    key: '1',
    nationalLevel: 12,
    provincialLevel: 11,
    universityLevel: 11,
    instituteLevel: 11,
    totalScore: 111,
  },
];

const SecondaryGrades: React.FC<any> = () => {
  return (
    <div>
      <Table
        columns={columns}
        dataSource={data}
        pagination={{ hideOnSinglePage: true }}
      />
    </div>
  );
};

export default SecondaryGrades;
